#include "status.h"
#include <QPainter>
#include <QPen>

Status::Status(QWidget *parent, Hraci * tabulka)
    : QWidget(parent)
{
    this->tabulka=tabulka;
}

void Status::paintEvent(QPaintEvent *event)
{
    QPen pen(Qt::black, 1, Qt::SolidLine);

    QPainter painter(this);
    pen.setColor(*tabulka->vratHrace(0)->zjistiBarvu());
    painter.setPen(pen);
    painter.drawText(0,0,80,20,Qt::AlignLeft,*tabulka->vratHrace(0)->zjistiJmeno());

    pen.setColor(*tabulka->vratHrace(1)->zjistiBarvu());
    painter.setPen(pen);
    painter.drawText(0,20,80,20,Qt::AlignLeft,*tabulka->vratHrace(1)->zjistiJmeno());
}
